<template>
	<view class="page-container">
		<view style="padding-top: 30rpx;"></view>
		<view class="settings">
			<view
				style="display: flex;align-items: center;justify-content: space-between;height: 96rpx;line-height: 96rpx;"
				@click="goyinsi">
				<view style="display: flex;align-items: center;">
					<image src="../../static/image/basic icon@2x (6).png" mode=""
						style="width: 48rpx;height: 48rpx;margin-right: 24rpx;"></image>
					<view>隐私政策</view>
				</view>
				<image src="../../static/image/Component 166@2x.png" mode="" style="width: 40rpx;height: 40rpx;">
				</image>
			</view>
			<view
				style="display: flex;align-items: center;justify-content: space-between;margin-top: 24rpx;height: 96rpx;line-height: 96rpx;"
				@click="goyonghu">
				<view style="display: flex;align-items: center;">
					<image src="../../static/image/basic icon@2x (5).png" mode="scaleToFill"
						style="width: 48rpx;height: 48rpx;margin-right: 24rpx;"></image>
					<view>用户协议</view>
				</view>
				<image src="../../static/image/Component 166@2x.png" mode="" style="width: 40rpx;height: 40rpx;">
				</image>
			</view>
		</view>
		<view  class="settings2" v-if="isLogin">
			<view
				style="display: flex;align-items: center;justify-content: space-between;height: 96rpx;line-height: 96rpx;"
				@click="goback">
				<view style="display: flex;align-items: center;">
					<image src="../../static/image/back.png" mode=""
						style="width: 48rpx;height: 48rpx;margin-right: 24rpx;"></image>
					<view>退出登录</view>
				</view>
			</view>
		</view>
		<view style="margin-top: 48rpx;display: flex;justify-content: center;flex-direction: column;align-items: center;">
			<image src="../../static/image/77tops.png" mode="" style="width: 282rpx;height:282rpx"> </image>
			<view style="font-weight: bold;color: #7B7D80;font-size: 24rpx;">关注公众号了解更多</view>
		</view>
	</view>
</template>

<script setup>
	import {
		reactive,
		ref
	} from 'vue'
	import {
	             onLoad,onShow
	     } from "@dcloudio/uni-app";	
	const goyinsi = () => {
		uni.navigateTo({
			url: '/pages/login/privacy'
		})
	}
	const goyonghu = () => {
		uni.navigateTo({
			url: '/pages/login/service'
		})
	}
	const isLogin = ref(false)
	onShow(() => {
		isLogin.value = !!uni.getStorageSync("token")
	})
	 const goback = () => {
	       uni.removeStorageSync('token')
	       uni.removeStorageSync('avatar')
	       uni.removeStorageSync('username')
		   uni.switchTab({
		   	url:'/pages/home/index'
		   })
	 }
</script>

<style scoped>
	.page-container {
		background-color: #F7F8FA;
		/* 设置背景色 */
		height: 100vh;
		/* 高度设置为视口高度 */
		width: 100vw;
		/* 宽度设置为视口宽度 */
	}

	.settings {
		margin: 24rpx;
		height: 224rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		padding: 24rpx;
		color: #2E3033;
	}
	.settings2{
		background: #FFFFFF;
		border-radius: 16rpx;
		margin: 24rpx;
		text-align: center;
		padding:24rpx;
		color: #2E3033;
	}
</style>